package game.Gamemode;

import javafx.scene.image.Image;
import javafx.scene.paint.Color;

public class KillLog {
    protected long killedTime;
    protected String killerName, victimName, weaponName;
    protected Color killerColor, victimColor;
    protected Image weaponImage;

    public KillLog(String killer, Color killerColor, String weaponName, Image wpnImage, String victim, Color victimcolor){
        this.killedTime = System.currentTimeMillis();

        this.killerName = killer;
        this.killerColor = killerColor;
        this.victimName = victim;
        this.victimColor = victimcolor;
        this.weaponImage = wpnImage;
        this.weaponName = weaponName;
    }

    public String getKillerName(){
        return this.killerName;
    }
    public Color getKillerColor(){
        return this.killerColor;
    }

    public String getVictimName(){
        return this.victimName;
    }
    public Color getVictimColor(){
        return this.victimColor;
    }

    public String getWeaponName(){return this.weaponName;}
    public Image getWeaponImage(){
        return this.weaponImage;
    }


    /**
     * Returns the time that the player was killed at in milliseconds.
     * @return
     */
    public long getKilledTime(){
        return this.killedTime;
    }

    /**
     * Returns the lifespan of the killog in seconds.
     * @return Seconds that have passed since the victim was killed.
     */
    public double getLifeSpan(){
        return (System.currentTimeMillis() - this.killedTime)/1000.0;
    }
}
